@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', 'Orbitron', sans-serif;
}

body {
    background-color: #0a0e17;
    color: #e0e6ed;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 153, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 128, 0.1) 0%, transparent 20%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0 30px;
}

.logo {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    filter: drop-shadow(0 0 10px rgba(0, 204, 255, 0.7));
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

h1 {
    color: #00ccff;
    font-size: 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
    letter-spacing: 2px;
    margin: 0;
}

.powered-by {
    color: #ffcc00;
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 5px;
}

h2 {
    color: #00ccff;
    margin: 15px 0;
    font-size: 1.8rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 400;
    letter-spacing: 1px;
}

.input-section {
    background-color: rgba(16, 23, 41, 0.8);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 204, 255, 0.2);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 204, 255, 0.2);
    backdrop-filter: blur(10px);
}

textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 10px;
    resize: none;
    font-size: 16px;
    margin-bottom: 20px;
    background-color: rgba(10, 14, 23, 0.8);
    color: #e0e6ed;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 204, 255, 0.1);
}

textarea:focus {
    outline: none;
    border-color: rgba(0, 204, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

.note {
    background-color: rgba(255, 204, 0, 0.1);
    border-left: 3px solid rgba(255, 204, 0, 0.7);
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.note p {
    color: rgba(255, 204, 0, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.note strong {
    color: #ffcc00;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

label {
    font-weight: bold;
    color: #00ccff;
    letter-spacing: 1px;
}

select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 204, 255, 0.3);
    background-color: rgba(10, 14, 23, 0.8);
    color: #e0e6ed;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: rgba(0, 204, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
}

button {
    background: linear-gradient(135deg, #00ccff, #0066ff);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0, 204, 255, 0.3);
    position: relative;
    overflow: hidden;
}

button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

button:hover {
    background: linear-gradient(135deg, #0066ff, #00ccff);
    box-shadow: 0 6px 20px rgba(0, 204, 255, 0.5);
    transform: translateY(-2px);
}

button:hover:before {
    left: 100%;
}

.result-section {
    background-color: rgba(16, 23, 41, 0.8);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 204, 255, 0.2);
    margin-bottom: 30px;
    min-height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(0, 204, 255, 0.2);
    backdrop-filter: blur(10px);
}

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 204, 255, 0.1);
    border-top: 4px solid #00ccff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #00ccff;
    font-size: 18px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 204, 255, 0.5);
}

.image-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.selection-title {
    color: #00ccff;
    font-size: 18px;
    margin-bottom: 5px;
    text-align: center;
    width: 100%;
}

.keywords-info {
    color: #ffcc00;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    font-style: italic;
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48%;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
}

.image-item img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 204, 255, 0.2);
    margin-bottom: 10px;
}

.image-loading {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(10, 14, 23, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(0, 204, 255, 0.2);
    margin-bottom: 10px;
}

.image-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 204, 255, 0.1);
    border-top: 3px solid #00ccff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.image-loading p {
    color: #00ccff;
    font-size: 14px;
}

.select-btn {
    width: 90%;
    padding: 10px;
    background: linear-gradient(135deg, #00ccff, #0066ff);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.select-btn:hover {
    background: linear-gradient(135deg, #0066ff, #00ccff);
    box-shadow: 0 4px 15px rgba(0, 204, 255, 0.5);
}

@media (max-width: 768px) {
    .image-item {
        width: 100%;
    }
}

.history-section {
    background-color: rgba(16, 23, 41, 0.8);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 204, 255, 0.2);
    border: 1px solid rgba(0, 204, 255, 0.2);
    backdrop-filter: blur(10px);
}

.history-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.history-item {
    border: 1px solid rgba(0, 204, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: rgba(10, 14, 23, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.history-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 204, 255, 0.3);
    border-color: rgba(0, 204, 255, 0.6);
}

.history-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.history-item .prompt {
    padding: 12px;
    font-size: 14px;
    color: #e0e6ed;
    background-color: rgba(10, 14, 23, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid rgba(0, 204, 255, 0.2);
}

/* 添加一些炫酷的动画效果 */
@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(0, 204, 255, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 204, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(0, 204, 255, 0.5); }
}

@media (max-width: 768px) {
    .options {
        flex-direction: column;
        gap: 15px;
    }
    
    .history-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    h1 {
        font-size: 2rem;
    }
}
